<template>
  <!--主屏幕：所有的页面都在这个屏幕显示-->
  <router-view/>
</template>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
/* 滚动条 */
::-webkit-scrollbar {
  display: none; // 隐藏滚动条
}

/* 暗黑模式 */
html.dark {
  img, .dark-img-bg {
    filter: brightness(0.8) saturate(1.25) // 滤镜: 暗黑模式图片的亮度和饱和度
  }
}
.el-table th {
  background: #18222C !important;
  .cell{
    font-weight: bolder;
    color: #82909F !important;
  }
}

html {
  font-family: Consolas, Avenir, Helvetica, Arial, sans-serif; // 字体
  font-size: 14px; // 全局字号
}

body {
  margin: 0; // 清空内边距
  padding: 0; // 清空外边距
}
</style>
<script setup>

/* 解决 ResizeObserver loop completed with undelivered notifications 问题 */
const _ResizeObserver = window.ResizeObserver;
window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
  constructor(callback) {
    callback = debounce(callback, 16);
    super(callback);
  }
}

const debounce = (fn, delay) => {
  let timer = null;
  return function () {
    let context = this;
    let args = arguments;
    clearTimeout(timer);
    timer = setTimeout(function () { fn.apply(context, args); }, delay);
  }
}


</script>